<?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
<p><?php _e('Enter your password to view comments.'); ?></p>
<?php return; endif; ?>
<h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
<div id="commentlist">
<?php if ( comments_open() ) : ?>
<?php endif; ?>
<?php if ( $comments ) : ?>
<?php foreach ($comments as $comment) : ?>
<h4><a href="#comment-<?php comment_ID() ?>">#<?php comment_ID() ?></a> <?php comment_author_link() ?> said (<?php if (function_exists('time_since')) {echo time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time()) . " ago";} else {the_time('F jS, Y');} ?>): <?php edit_comment_link(__("Edit"), '&#8212; '); ?></h4>
<blockquote id="comment-<?php comment_ID() ?>"><?php comment_text() ?></blockquote>
<?php endforeach; ?>
<h5><?php comments_rss_link(__('RSS')); ?> for theses comments. <?php if ( pings_open() ) : ?> <a href="<?php trackback_url() ?>" rel="trackback"><?php _e('Trackbacks'); ?></a><?php endif; ?></h5>
<?php endif; ?>
<?php if ( comments_open() ) : ?>
<h3 id="postcomment"><?php _e('Post a comment'); ?></h3>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<h6>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</h6>
<?php else : ?>
<div class="formcontainer">
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a></strong>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log off') ?>">Log off?</a></p>
<?php else : ?>
<div class="formleft"><label for="author">Name:</label></div>
<div class="formright"><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" /> <?php if ($req) _e('*Required'); ?></div>
<div class="formleft"><label for="email">Email:</label></div>
<div class="formright"><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" /> <?php if ($req) _e('*Required'); ?></div>
<div class="formleft"><label for="url">Website:</label></div>
<div class="formright"><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /></div>
<?php endif; ?>
<div class="formleft"><label for="comment">Message:</label></div>
<div class="formright"><textarea name="comment" id="comment" cols="35" rows="8" tabindex="4"></textarea></div>
<div class="formright"><input name="submit" type="submit" id="submit" tabindex="5" value="Submit" /> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></div>
<?php do_action('comment_form', $post->ID); ?>
</form>
</div>
<?php endif; ?>
<?php else : ?>
<p><?php _e('Comments are closed. Apologies.'); ?></p>
<?php endif; ?>
</div>